import request from '@/utils/request'

export default {
  /** 获取仿真设备列表 */
  getSmList() {
    return request({
      url: '/simulation-equipment/list',
      method: 'get'
    })
  },

  /** 根据条件获取仿真设备页 */
  getSmPage(data) {
    return request({
      url: '/simulation-equipment/list/page',
      method: 'post',
      params: data
    })
  },

  /** 添加仿真设备 */
  addSm(data) {
    return request({
      url: '/simulation-equipment/add',
      method: 'post',
      data
    })
  },

  /** 删除仿真设备 */
  removeSm(id) {
    return request({
      url: `/simulation-equipment/remove/${id}`,
      method: 'delete'
    })
  },

  /** 更新仿真设备 */
  updateSm(id, data) {
    return request({
      url: `/simulation-equipment/updateById/${id}`,
      method: 'put',
      data
    })
  },

  exportToExcel() {
    return request({
      url: '/simulation-equipment/export',
      method: 'get',
      responseType: 'blob'
    })
  }
}
